#include <stdio.h>
#include <stdlib.h>

int main() {
    const int len = 128;
    char * buf = (char*)malloc(len);
    snprintf(buf,len - 1, "hello world");
    printf("%s\n", buf);
    free(buf);
    return 0;
}